firmware/tcgbios: Prevent integer truncation in the return value
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 25 Nov 2013 11:04:20 +0000 (11:04 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Nov 2013 10:58:35 +0000 (10:58 +0000)
rc inside the function is uint32_t.  None of the callers check the return
value.

Coverity ID: 1055442

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/firmware/rombios/32bit/tcgbios/tcgbios.c

index d5e2202df4f11f8e74cdbdf21fe2266bedd23422..01d4f2f6b035479094bcf2e0aba9bbbae79f4eaf 100644 (file)
@@ -428,7 +428,7 @@ uint32_t tcpa_get_laml(void)
  *  data       : pointer to the data (i.e., string) to be added to the log
  *  length     : length of the data
  */
-static uint16_t
+static uint32_t
 tcpa_add_measurement_to_log(uint32_t pcrIndex,
                             uint32_t event_type,
                             uint32_t event_id,